Skip to content

fix(ci): inject KOKORO_ROOT fallback for Ubuntu 22.04 - #18004

Draft
chalmerlowe wants to merge 1 commit into
mainfrom
fix/kokoro-root-ubuntu2204
Draft

fix(ci): inject KOKORO_ROOT fallback for Ubuntu 22.04#18004
chalmerlowe wants to merge 1 commit into
mainfrom
fix/kokoro-root-ubuntu2204

Conversation

@chalmerlowe

Copy link
Copy Markdown
Contributor

Description

Problem

Kokoro jobs running on the newer Ubuntu 22.04 environment fail because the KOKORO_ROOT environment variable is missing. This causes the Python script trampoline_v1.py to crash with a KeyError.

Solution

This change modifies .kokoro/trampoline.sh to set a default value for KOKORO_ROOT (/tmpfs) if it is not already set. This ensures compatibility with the new environment without breaking existing workflows.

A temporary comment was also added to packages/google-cloud-vision/google/cloud/vision_helpers/__init__.py to ensure that system tests are triggered for this change.

Notes to Reviewers

This is a repository-level workaround to verify if the missing environment variable is the main cause of the Kokoro build failures on Ubuntu 22.04. If this fixes the tests, we can discuss whether to keep this fallback in the script or address it in the environment setup.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request exports the KOKORO_ROOT environment variable in the trampoline script and adds a trigger comment to a production Python file in the google-cloud-vision package. The review feedback recommends avoiding dummy trigger comments in production source files, suggesting instead the use of empty commits or modifying test files to trigger CI/CD pipelines.

import proto # type: ignore
from google.api_core import protobuf_helpers as protobuf

# Trigger comment for system tests

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid adding dummy or trigger comments to production source files to trigger CI/CD pipelines or system tests. This can lead to stale comments and unnecessary noise in the codebase history. Instead, consider using an empty commit (git commit --allow-empty -m 'trigger tests') or modifying a test file if absolutely necessary.

@chalmerlowe chalmerlowe self-assigned this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant